package com.stone.business.jc.pojo;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.stone.utils.DateFormatTool;

/**
 * 考勤
 */
@Entity
@Table(name = "TAB_KQ")
public class TKq implements java.io.Serializable {

	private Long id;

	/**
	 * 人员id
	 */
	private Long userid;
	
	/**
	 * 考勤月
	 */
	private Date kqrq;
	private String strKqrq;
	
	/**
	 * 出勤天数
	 */
	private Integer cqts;
	
	/**
	 * 缺勤原因
	 */
	private String qqyy;
	
	/**
	 * 缺勤天数
	 */
	private Integer qqts;
	
    @Id
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_KQ")
    @SequenceGenerator(name="SEQ_KQ",allocationSize=1, sequenceName="SEQ_KQ")
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

	public Long getUserid() {
		return userid;
	}

	public void setUserid(Long userid) {
		this.userid = userid;
	}

	public Date getKqrq() {
		return kqrq;
	}

	public void setKqrq(Date kqrq) {
		this.kqrq = kqrq;
	}

	public Integer getCqts() {
		return cqts;
	}

	public void setCqts(Integer cqts) {
		this.cqts = cqts;
	}

	public String getQqyy() {
		return qqyy;
	}

	public void setQqyy(String qqyy) {
		this.qqyy = qqyy;
		this.strKqrq = DateFormatTool.formate(kqrq,"yyyy-MM-dd");
	}

	@Transient
	public String getStrKqrq() {
		return strKqrq;
	}

	public void setStrKqrq(String strKqrq) {
		this.strKqrq = strKqrq;
		this.kqrq = DateFormatTool.formatToDate(strKqrq,"yyyy-MM-dd");
	}

	public Integer getQqts() {
		return qqts;
	}

	public void setQqts(Integer qqts) {
		this.qqts = qqts;
	}
	
	

}